package com.arthur.dao;

import com.arthur.bean.Cart;
import com.arthur.bean.Order;
import com.arthur.bean.Product;
import com.arthur.bean.User;

import java.util.List;

/**
 * @所在项目:maven_ssm202008_wanghongzhao
 * @所在包:com.arthur.service
 * @作者:arthur_wang
 * @创建时间:2020-08-28 19:34:52
 * @说明:用户模块的持久化接口
 **/
public interface UserDao {
    public int loginByUsernameAndUserpwd(String username, String userpwd) throws Exception;

    public int deleteUserinfoById(int id) throws Exception;

    public int deleteCartinfoById(int id) throws Exception;

    public int obtainUserinfoRows() throws Exception;

    public int registerByUserinfo(User user) throws Exception;

    public int updateUser(User user) throws Exception;

    public List<User> fetchUserinfoListByStartindexAndRows(int startIndex, int rowsPerpage) throws Exception;

    public User fetchUserinfoById(int id) throws Exception;

    public User fetchUserinfoByName(String name)throws Exception;

    public Product fetchProductinfoByName(String name)throws Exception;

    public int addOrderinfo(Order order)throws Exception;

    public int addCartinfo(Cart cart)throws Exception;

    public int obtainOrderinfoRows() throws Exception;

    public List<Order> fetchOrderinfoListByStartindexAndRows(int startIndex, int rowsPerpage, String username) throws Exception;

    public int obtainCartinfoRows() throws Exception;

    public List<Cart> fetchCartinfoListByStartindexAndRows(int startIndex, int rowsPerpage, String username) throws Exception;

    public Cart fetchCartinfoByid(int ioocid)throws Exception;
}
